@namespace DevToys.Blazor.Components.UIElements
@using DevToys.Api;
@inherits ComponentBase

<ToggleSwitch id="@UISwitch.Id"
              IsVisible="@UISwitch.IsVisible"
              IsEnabled="@UISwitch.IsEnabled"
              HorizontalAlignment="@UISwitch.HorizontalAlignment"
              VerticalAlignment="@UISwitch.VerticalAlignment"
              Text="@(UISwitch.IsOn ? (UISwitch.OnText ?? DevToys.Localization.Strings.ToggleSwitch.ToggleSwitch.On) : (UISwitch.OffText ?? DevToys.Localization.Strings.ToggleSwitch.ToggleSwitch.Off))"
              IsOn="@UISwitch.IsOn"
              OnCheckedChanged="@OnCheckedChanged"/>